
package com.android.test.activity;

import com.android.test.R;

import android.app.Activity;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class MenuAboutActivity extends Activity {
    @Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dialog_about);
		TextView tv = (TextView)findViewById(R.id.version_code);
		try {
			PackageInfo info = this.getPackageManager().getPackageInfo(
                "com.android.test", PackageManager.GET_UNINSTALLED_PACKAGES);
			tv.setText(info.versionName);
		} catch (Throwable t) {
			tv.setText("");
		}
		
		TextView sinweibo = (TextView)findViewById(R.id.textview2_feedback_microblog);
		sinweibo.setText(Html.fromHtml("<a href='http://weibo.com/lczm'>@立成志名</a>"));
        sinweibo.setMovementMethod(LinkMovementMethod.getInstance());
        sinweibo.setOnClickListener(new OnClickListener() {
			
			public void onClick(View v) {
				MenuAboutActivity.this.finish();
			}
		});
	}
}
